package com.d3works.apps.supplychain.service;

import com.d3works.apps.base.service.ProductCompanyService;
import com.d3works.apps.base.service.app.AppBaseService;
import com.d3works.apps.stock.db.StockLocationLine;
import com.d3works.apps.stock.service.StockCorrectionServiceImpl;
import com.d3works.apps.stock.service.StockLocationLineService;
import com.d3works.apps.stock.service.StockMoveLineService;
import com.d3works.apps.stock.service.StockMoveService;
import com.d3works.apps.stock.service.config.StockConfigService;
import com.google.inject.Inject;
import java.util.Map;

public class StockCorrectionServiceSupplychainImpl extends StockCorrectionServiceImpl {

  @Inject
  public StockCorrectionServiceSupplychainImpl(
      StockConfigService stockConfigService,
      ProductCompanyService productCompanyService,
      StockLocationLineService stockLocationLineService,
      AppBaseService baseService,
      StockMoveService stockMoveService,
      StockMoveLineService stockMoveLineService) {
    super(
        stockConfigService,
        productCompanyService,
        stockLocationLineService,
        baseService,
        stockMoveService,
        stockMoveLineService);
  }

  @Override
  public void getDefaultQtys(
      StockLocationLine stockLocationLine, Map<String, Object> stockCorrectionQtys) {
    super.getDefaultQtys(stockLocationLine, stockCorrectionQtys);
    stockCorrectionQtys.put("reservedQty", stockLocationLine.getReservedQty());
  }
}
